package cn.ycxy.lbl.common.exception.enums;

import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

@Getter
@ToString
@AllArgsConstructor
public enum ResponseEnum {

    SUCCESS(0, "成功"),
    ERROR(-1, "服务器内部错误"),
    BAD_REQUEST(400, "参数格式不正确"),
    UNAUTHORIZED(401, "您的token不正确,请重新登录"),
    UN_LOGIN(402, "您还没有登录"),
    FORBIDDEN(403, "您无此操作权限"),
    CONFLICT(409, "被访问的用户不存在id"),
    INTERNAL_SERVER_ERROR(500, "无法转化认证用户信息json"),
    LOGIN_ERROR(501, "用户注册授权登录失败"),
    UPDATE_ERROR(502, "更新失败"),
    LOGIN_BAN(505, "登录失败，用户账号已经被禁用！"),
    POSTS_SAVE_ERROR(1001, "帖子发布失败！"),
    POSTS_DELETE_ERROR(1002, "要删除的帖子id不能为空！"),
    POSTS_DELETE_FAILED(1002, "删除帖子失败！"),
    POSTS_NOT_FOUNT(1003, "您访问的帖子不存在！"),
    COMMENT_SAVE_FAILED(1005, "发布评论失败！"),
    MAINTAIN_SAVE_FAILED(1010, "提交维修信息失败！"),
    MAINTAIN_UPDATE_ERROR(1012, "更新失败, 您的维修上报信息已在处理或已处理完成!"),
    FEEDBACK_SAVE_FAILED(1013, "提交反馈信息失败！"),
    ORDER_COMMIT_FAILED(1014, "您已存在该商品订单！");

    /**
     * 响应状态码
     */
    private Integer code;
    /**
     * 响应消息
     */
    private String message;

}
